<template>
	<div class="postNewsOne">
		<i-form :model="formItem" :label-width="150" >
			<Form-item label="大标题：">
				<Row :gutter="16">
					<i-col span="16">
						<i-input v-model="formItem.title" placeholder="请输入文章的大标题"></i-input>
					</i-col>
				</Row>
			</Form-item>
			<Form-item label="作者/来源：">
				<Row :gutter="16">
					<i-col span="8">
						<i-input v-model="formItem.author" placeholder="请输入文章的作者"></i-input>
					</i-col>
					<i-col span="8">
						<i-input v-model="formItem.source" placeholder="请输入文章的来源"></i-input>
					</i-col>
				</Row>
			</Form-item>
			<Form-item label="标签匹配：">
				<Row :gutter="16">
					<i-col span="16">
						<i-select v-model="formItem.tabs" filterable placeholder="请选择文章的匹配标签">
							<i-option v-for="item in cityList" :value="item.value">{{ item.label }}</i-option>
						</i-select>
					</i-col>
				</Row>
			</Form-item>
			<Form-item label="文章发布时间：">
				<Row :gutter="16">
					<i-col span="3">
						<Date-picker type="date" placeholder="选择日期" v-model="formItem.date"></Date-picker>
					</i-col>
					<i-col span="3">
						<Time-picker type="time" placeholder="选择时间" v-model="formItem.time"></Time-picker>
					</i-col>
				</Row>
			</Form-item>
			<Form-item label="正文：" class="quill">
				<Row>
					<i-col span="22">
						<quill-editor 
						class="quill-editor" 
						ref="myTextEditor"
						v-model="formItem.content"
						:config="editorOption">
					</quill-editor>
				</i-col>
			</Row>
		</Form-item>
		<Form-item>
			<i-button @click="onSubmit" type="primary">提交</i-button>
		</Form-item>
	</i-form>
</div>
</template>

<script>
export default {

	name: 'postNewsOne',

	data () {
		return {
			formItem: {
				title: '',
				author:'',
				source:'',
				tabs:'',
				date: '',
				time:'',
				content:''
			},
			cityList: [
			{
				value: '心理',
				label: '心理'
			}
			],
			editorOption: {

			}
		}
	},
	components:{
		
	},
	methods:{
		onSubmit(){
			alert(this.formItem.content)
		}
	}
}
</script>

<style lang="css" scoped>
.postNewsOne{
	width: 100%;
	height: 100%
}
.quill{
	height: 340px
}
.quill-editor{
	height: 300px
}
.postNewsOne .ivu-input{
	width: 100%
}
</style>